{*SMARTY*}
{add_layout file='add_adodb_admin_layout'}
{block name='main'}
   <form method='post'>
      <h2>Login</h2>
      {$error_message}
      <label>
         Type
         <select name="type">
            {html_options options=$adodb_database_types selected=$type}
         </select>
      </label>
      <label>
         Host
         <input name="host" value="{$host|default:'localhost'}" type="text" />
      </label>
      <label>
         Username
         <input name="username" value="{$username|default:'root'}" type="text" />
      </label>
      <label>
         Password
         <input name="password" value="{$password}" type="password" />
      </label>
      <label>
         Database Name
         <input name="database" value="{$database}" type="text" />
      </label>
      <input name="mode" value="login" type="hidden" />
      {add_include file='submit_button' text='Login'}
   </form>
   {if $rows}
      <table>
         <caption>Query Result</caption>
      {foreach $rows as $row}
         <tr>
            {foreach $fields as $field}
               <td>{$row->$field}</td>
            {/foreach}
         </tr>
      {/foreach}
      </table>
   {/if}
{/block}